package com.zc.app.bean;

import com.sun.org.apache.regexp.internal.RE;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
 * Created by CZC70 on 2017/5/12.
 */
public class Monitor {
    public static final String DEFAULT_SCREEN_TYPE = "flat";
    private StringProperty screenType;

    public String getScreenType(){
        return (screenType == null) ? DEFAULT_SCREEN_TYPE : screenType.get();
    }

    public void setScreenType(String newScreenType){
        if(screenType != null
                || !DEFAULT_SCREEN_TYPE.equals(newScreenType)) {
            screenTypeProperty().set(newScreenType);
        }
    }

    public StringProperty screenTypeProperty(){
        if(screenType == null){
           screenType = new SimpleStringProperty(this, "screen", DEFAULT_SCREEN_TYPE);
        }
        return screenType;
    }
}
